/**
 * Environments
 */
jsx3.lang.Package.definePackage("tibco.admin.environments.containers.net", function (ep) {
});

/**
 * Environments
 */
jsx3.lang.Class.defineClass("tibco.admin.environments.containers.net.MSDotNetContainer",
        jsx3.lang.Object,
        [tibco.admin.environments.containers.ContainersInterface],
        function (plugin) {
            plugin.instance = null

            plugin.prototype.initPlugin = function() {
            }

            plugin.prototype.getNamespace = function() {
                return "tibco.admin";
            }

            plugin.prototype.destroyPlugin = function() {
                // nothing...
            }

            plugin.prototype.loadComponent = function(parent) {
                // do load of config UI here!  This particular plugin does not have extended configuration!
            }

            plugin.getInstance = function() {
                if(!this.instance) {
                    this.instance = new tibco.admin.environments.containers.net.MSDotNetContainer();
                }
                return this.instance;
            }

            plugin.prototype.onAfterComponentUnloaded = function() {
                this.containerName = null;
                this.block = null;
                if(this.isInConfigureMode()) {
                    this.endConfigureMode();
                }
                /// clean up here!
            }

            plugin.prototype.getType = function() {
                return "com.tibco.matrix.container.dotnetse.runtime";
            }

            plugin.prototype.hasExtendedConfiguration = function() {
                return false;
            }

            plugin.prototype.isInConfigureMode = function() {
                return this.isConfigureMode;
            }

            plugin.prototype.setEnvId = function(envId) {
                this.envId = envId;
            }

            plugin.prototype.setNodeId = function(nodeId) {
                this.nodeId = nodeId;
            }

            plugin.prototype.setContainer = function(containerName, major, minor, maintenance, fragment) {
                if(this.isConfigureMode) {
                    alert(tibco.admin.Main.getServer().getDynamicProperty("@@msgCannotUpdateContainerIdMessage_33"));
                    return;
                }
                this.containerName = containerName;
            }
        }
        );